package com.xzy.generic;

import com.xzy.simple.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;

/**
 * {@link GenericEvent} 事件处理器
 *
 * @author xzy.xiao
 * @date 2023/2/27  9:51
 */
public class GenericEventListener {

    Logger logger = LoggerFactory.getLogger(GenericEventListener.class);


    @EventListener
    public void onUserEvent(GenericEvent<User> userGenericEvent) {
        logger.info("监听到事件：{}", userGenericEvent);
        // TODO:
    }

    @EventListener
    public void onLoginEvent(GenericEvent<Login> loginGenericEvent) {
        logger.info("监听到事件：{}", loginGenericEvent);
        // TODO:
    }
}
